package com.spark.service.consumer;

import com.spark.common.QueueNames;
import com.spark.entity.BusTypeMsgSendVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Service;

/**
 * @Author sc
 * @DATE 2024/5/23 15:01
 * @Description:
 * @Version 1.0
 */
@Service
@Slf4j
public class BusTypeMsgConsumer {

    /**
     *  消费者消费生产者发来的消息
     * @param vo
     */
    @RabbitListener(queues = QueueNames.BUS_TYPE_MSG_QUEUE)
    public void msgSend(BusTypeMsgSendVO vo) {
        log.info("=========================消费者开始消费拉=========================");
        log.info("消费者收到消息:"+vo);
    }

}
